/*
 * @Author: yanjinzhong
 * @Date: 2021-04-12 22:18:00
 * @Description: file content
 */
import {computed, defineComponent} from 'vue'

export default defineComponent({
  name:'SvgIcon',
  props:{
    name:{
      type:String,
      requiered:true,
    },
    color:{
      type:String,
      default:'#fff'
    },
    width:{
      type:String,
      default:'24px'
    },
    height:{
      type:String,
      default:'24px'
    }
  },
  setup(props) {
    const name = computed(() => `#icon-${props.name}`)
    
    return () => (
      <>
        <svg aria-hidden class="mr-5px" width={props.width} height={props.height} fill={props.color}>
          <use xlinkHref={name.value}></use>
        </svg> 
      </>
    )
  }
})